//
//  XLGSendQueuePool.h
//  etionCBLogic
//
//  Created by wjxfhxy on 15/10/28.
//  Copyright (c) 2015年 GuangZhouXuanWu. All rights reserved.
//

#import <Foundation/Foundation.h>

#import "XLGSendQueuePoolItem.h"

@class XLGSendQueuePoolItem;

@protocol XLGSendQueuePoolItemDelegate <NSObject>

- (void)removeSendOperation:(XLGSendQueuePoolItem*)sendQueuePoolItem;

@end

@interface XLGSendQueuePoolItem (XLGSendQueuePoolItemInternal)

@property(nonatomic,assign) id<XLGSendQueuePoolItemDelegate> delegate;

- (BOOL)startItem;

- (void)stopItem;

@end

@interface XLGSendQueuePool : NSObject<XLGSendQueuePoolItemDelegate>

@property(nonatomic,assign) NSUInteger maxCount;

@property(nonatomic,readonly) NSUInteger currentCount;

@property(nonatomic,readonly) NSArray *items;

- (BOOL)addSendOperation:(XLGSendQueuePoolItem*)sendQueuePoolItem;

@end
